package com.swy.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class SensitiveCheckResult {
    private String fileName;
    private boolean hasSensitiveWords;
    private List<String> sensitiveWords;
    private String errorMessage;
    private String fileContent;
    private String fileType;
    private String encoding;
    // 新增：检测到的所有敏感词的上下文列表
    private List<SensitiveWordContext> sensitiveWordContexts;

    // 内部静态类：敏感词上下文信息
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SensitiveWordContext {
        // 敏感词
        private String word;
        // 敏感词在文本中的位置
        private int position;
        // 敏感词上下文
        private String context;
        // 敏感词在上下文中的起始位置
        private int wordStartPos;
        // 敏感词在上下文中的结束位置
        private int wordEndPos;
    }
} 